<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript">
function confirmSubmit()
{
var agree=confirm("Are you sure you wish to Remove?");
if (agree)
	return true ;
else
	return false ;
}
</script>
<table>
	<tr>
		<td><h2>Product Type</h2></td>
	</tr>
	<s:if test="productType.size() > 0">		
		<s:iterator value="productType">
			<tr><td></td><td>
				<form name='removeProductType_<s:property value="uuid" />' action="removeProductType" method="post" onsubmit="return confirmSubmit()">
					<input type="hidden" name="uuid" value="${product.uuid}">
					<input type="hidden" name="p" value="${p}">
					<input type="hidden" name="productTypeUuid" value='<s:property value="uuid" />'>	
					<s:property value="productType" />
					<input type="submit" value="remove">
			</form></td></tr>
		</s:iterator>
	</s:if>
	<s:if test="allProductType.size() > 0">	
	<tr><td><b>Assign Product Type</b></td>
	<td>
		<form name="assignProductType" action="assignProductType" method="post">
			<input type="hidden" name="uuid" value="${product.uuid}">
			<input type="hidden" name="p" value="${p}">
			<select name="productTypeUuid">
				<s:iterator value="allProductType">			
					<option value='<s:property value="uuid" />'><s:property value="productType" /></option>
				</s:iterator>
			</select>
			<input type="submit" name="assign" value="assign">
		</form>
	</td>
	</tr>
	</s:if>
</table>
<a href="product?p=${p}"><b>Back</b></a>